projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7868031
)
spi: spi_flash: Fix the arguments of stm_is_locked_sr()
author
Fabio Estevam
<
[email protected]
>
Wed, 6 Jan 2016 00:24:39 +0000
(22:24 -0200)
committer
Jagan Teki
<
[email protected]
>
Thu, 7 Jan 2016 14:59:33 +0000
(20:29 +0530)
stm_is_locked_sr() takes the status register (SR) value as the last
parameter, not the second.
Based on a patch from Brian Norris for the linux kernel:
http://git.infradead.org/linux-mtd.git/commit/
a32d5b726ff8cf32bf491522b0ac8ae2545a063e
Signed-off-by: Fabio Estevam <
[email protected]
>
Reviewed-by: Jagan Teki <
[email protected]
>
drivers/mtd/spi/spi_flash.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/spi/spi_flash.c
b/drivers/mtd/spi/spi_flash.c
index 7ffa136f5a47a6853d587a032597fe68b96f8bfe..b7b7f0044e74ce57c8c460e35cae1c2c6d65fb67 100644
(file)
--- a/
drivers/mtd/spi/spi_flash.c
+++ b/
drivers/mtd/spi/spi_flash.c
@@
-767,8
+767,8
@@
int stm_unlock(struct spi_flash *flash, u32 ofs, size_t len)
return ret;
/* Cannot unlock; would unlock larger region than requested */
- if (stm_is_locked_sr(flash,
status_old, ofs -
flash->erase_size,
-
flash->erase_size
))
+ if (stm_is_locked_sr(flash,
ofs - flash->erase_size,
flash->erase_size,
+
status_old
))
return -EINVAL;
/*
* Need largest pow such that: